<!--{template admin/tpl/header}-->

<div class="mainarea">
<div class="maininner">


<!--{if $_GET[op] == 'add' || $_GET[op] == 'edit'}-->
<script language="javascript" src="image/editor/editor_function.js"></script>
<div class="block style1">
	<div class="topactions"><a href="admincp.php?ac=study">返回</a></div>
	<form method="post" action="admincp.php?ac=study" enctype="multipart/form-data">
		<table cellspacing="4" cellpadding="4" width="100%" class="infotable">
			<tr>
				<td>
					<select name="classid" id="classid">
						<option value="0">选择分类</option>
						<!--{loop $classarr $value}-->
						<!--{if $value['classid'] == $study['classid']}-->
						<option value="$value[classid]" selected>$value[classname]</option>
						<!--{else}-->
						<option value="$value[classid]">$value[classname]</option>
						<!--{/if}-->
						<!--{/loop}-->
					</select>
					<input type="text" class="t_input" id="subject" name="subject" value="$study[subject]" size="60"/>
				</td>
			</tr>
			<tr>
				<td>
				$fck
				</td>
			</tr>
		</table>
		<table cellspacing="4" cellpadding="4" width="100%" class="infotable">
			<tr>
				<th width="50">标签</th>
				<td><input type="text" class="t_input" size="40" id="tag" name="tag" value="$study[tag]"></td>
			</tr>
		</table>
		<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
		<input type="hidden" name="studyid" value="$study[studyid]" />
	
	<table cellspacing="4" cellpadding="4" width="100%" class="infotable">
		<tr>
			<th width="100">&nbsp;</th>
			<td><input type="submit" id="studysubmit" name="studysubmit" value="保存发布" class="submit" /></td>
		</tr>
	</table>
	</form>
</div>
<!-- //添加结束 -->
<!--{else}-->
	<form method="get" action="admincp.php">
	<div class="block style4">
		
		<table cellspacing="3" cellpadding="3">
		<!--tr><th>发布者UID</th><td><input type="text" name="uid" value="$_GET[uid]"></td>
		</tr -->
		<tr><th>标题*</th><td><input type="text" name="subject" value="$_GET[subject]"></td>
			<th>内容*</th><td><input type="text" name="message" value="$_GET[message]">*表示支持模糊查询</td>
		</tr>
		<!--tr>
			<th>不容许评论</th><td>
			<input type="checkbox" name="noreply" value="1" $noreply>
			</td>
		</tr -->
		<tr>
			<th>分类</th>
			<td colspan="3">
			<select name="classid" id="classid">
				<option value="">选择分类</option>
				<!--{loop $classarr $value}-->
				<option value="$value[classid]" $classcheck[$value[classid]] >$value[classname]</option>
				
				<!--{/loop}-->
			</select>
		</td>
		</tr>
		<tr>
			<th>指定帮组ID</th>
			<td colspan="3">
				<input type="text" name="studyid" value="$_GET[studyid]" />
			</td>
		</tr>
		<tr><th>查看数</th><td colspan="3">
			<input type="text" name="viewnum1" value="$_GET[viewnum1]" size="10"> ~
			<input type="text" name="viewnum2" value="$_GET[viewnum2]" size="10">
		</td></tr>
		<tr><th>发布时间</th><td colspan="3">
			<input type="text" name="dateline1" value="$_GET[dateline1]" size="10"> ~
			<input type="text" name="dateline2" value="$_GET[dateline2]" size="10"> (YYYY-MM-DD)
		</td></tr>

		<tr><th>结果排序</th>
		<td colspan="3">
		<select name="orderby">
		<option value="">默认排序</option>
		<option value="dateline"$orderby[dateline]>发布时间</option>
		<option value="viewnum"$orderby[viewnum]>查看数</option>
		</select>
		<select name="ordersc">
		<option value="desc"$ordersc[desc]>递减</option>
		<option value="asc"$ordersc[asc]>递增</option>
		</select>
		<select name="perpage">
		<option value="20"$perpages[20]>每页显示20个</option>
		<option value="50"$perpages[50]>每页显示50个</option>
		<option value="100"$perpages[100]>每页显示100个</option>
		<option value="1000"$perpages[1000]>一次处理1000个</option>
		</select>
		<input type="hidden" name="ac" value="study">
		<input type="submit" name="searchsubmit" value="搜索" class="submit">
		</td>
		</tr>
		</table>

	</div>
	</form>
<!--{if $list}-->

	<form method="post" action="admincp.php?ac=study">
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<div class="bdrcontent">
		<div class="topactions"><a href="admincp.php?ac=study">浏览</a> | <a href="admincp.php?ac=study&op=add">添加学习资料</a></div>

	<!--{if $perpage>100}-->
		<p>总共有满足条件的数据 <strong>$count</strong> 个</p>
		<!--{loop $list $value}-->
		<input type="hidden" name="ids[]" value="$value[studyid]">
		<!--{/loop}-->
	
	<!--{else}-->
		<table cellspacing="0" cellpadding="0" class="formtable">
		<tr><td width="25">&nbsp;</td><th>标题</th><!--{if $allowmanage}--><th width="80">作者</th><!--{/if}--><th width="80">查看</th><th width="80">时间</th><th width="80">操作</th></tr>
		<!--{loop $list $value}-->
		<tr>
			<td>
				<input type="checkbox" name="ids[]" value="$value[studyid]">
			</td>
			<td>
				[<a href="admincp.php?ac=study&classid=$value[classid]">$value[classname]</a>]&nbsp;
				<a href="space.php?uid=$value[uid]&do=study&id=$value[studyid]" target="_blank">$value[subject]</a>
			</td>
			<td>$value[viewnum]</td>
			<td><!--{date('Y-m-d',$value[dateline])}--></td>
			<td><a href="admincp.php?ac=study&op=edit&studyid=$value[studyid]">编辑</a>&nbsp;
			</td>
		</tr>
		<!--{/loop}-->
		</table>
	<!--{/if}-->
	</div>
	
	<div class="footactions">
		<!--{if $perpage<=100}--><input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'ids')">全选<!--{/if}-->
		<input type="hidden" name="mpurl" value="$mpurl">
		<input type="submit" name="deletesubmit" value="批量删除" onclick="return confirm('本操作不可恢复，确认删除？');" class="submit">
	
		<div class="pages">$multi</div>
	</div>
	</form>
<!--{else}-->
	<div class="bdrcontent">
			<div class="topactions"><a href="admincp.php?ac=study">浏览</a> | <a href="admincp.php?ac=study&op=add">添加学习资料</a></div>
		<p>指定条件下还没有数据</p>
	</div>
<!--{/if}-->


<!--{/if}-->


</div>
</div>

<div class="side">
	<!--{template admin/tpl/side}-->
</div>

<!--{template admin/tpl/footer}-->